package dk.dashboardFP.panels.subPanels.ui.windowSubPanelUI.scrollWindow {
	import flash.display.MovieClip;
	import dk.dashboardFP.uiElements.scrollbar.IScrollHandle;
	import flash.display.Sprite;

	/**
	 * @author jk
	 */
	public class WindowScrollBar extends Sprite implements IScrollHandle {
		private var _asset : ScrollBarAsset;
		private var _bar : MovieClip;

		public function WindowScrollBar() {
			
			// setup 
			_asset=new ScrollBarAsset();
			addChild(_asset);
			
			_asset.x=4;
			
			_bar = _asset.getChildByName("bar") as MovieClip;
		}

		public function show() : void {
			visible=true;
		}
		
		public function hide() : void {
			visible=false;
		}
		
		public function get nHeight() : Number {
			return _bar.height;
		}

		public function set nHeight(nNewHeight : Number) : void {
			_bar.height = nNewHeight;
		}
	}
}
